package com.usian.controller;

import com.usian.service.KafkaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class KafkaController {
    @Autowired
    private KafkaService kfkService;

    @GetMapping("/send")
    public String send(String msg){
        kfkService.sendMsg("usian",msg);
        return "success-topic1";
    }

}
